package com.ybox.app.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.ybox.common.core.web.domain.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size;

/**
 * 收藏夹
 * @author 16554
 */
@ApiModel(value = "收藏夹")
public class AppCollect extends BaseEntity {

    private static final long serialVersionUID = 1L;

    /**
     * 收藏夹id, 加上JsonFormat,否则数据到前端会精度损失
     */
    @ApiModelProperty(value = "收藏夹id")
    @JsonFormat(shape = JsonFormat.Shape.STRING)
    private String collectId;

    /**
     * 收藏夹标题
     */
    @ApiModelProperty(value = "收藏夹标题")
    private String title;

    /**
     * 收藏夹名称
     */
    @ApiModelProperty(value = "收藏夹名称")
    private String name;

    /**
     * 收藏夹icon
     */
    @ApiModelProperty(value = "收藏夹icon")
    private String icon;

    /**
     * icon颜色
     */
    @ApiModelProperty(value = "icon颜色")
    private String iconColor;

    /**
     * 收藏夹所属用户
     */
    @ApiModelProperty(value = "收藏夹所属用户")
    private Long uId;

    /**
     * 0 暂时不可用  1 永久不可用  2 正常可用
     */
    @ApiModelProperty(value = " 0 暂时不可用  1 永久不可用  2 正常可用")
    private Boolean status;

    /**
     * 收藏夹url
     */
    @ApiModelProperty(value = "收藏夹url")
    private String url;

    /**
     * 收藏夹收藏数量
     */
    @ApiModelProperty(value = "收藏夹收藏数量")
    private Integer totalNum;

    /**
     * 收藏夹操作内容
     */
    @ApiModelProperty(value = "收藏夹操作内容")
    private String operate;

    /**
     * 收藏夹详细说明
     */
    @ApiModelProperty(value = "收藏夹详细说明")
    private String info;

    /**
     * 收藏夹类型id
     */
    @ApiModelProperty(value = "收藏夹类型id")
    private Integer collectType;

    /**
     * tag名称
     */
    @ApiModelProperty(value = "tag名称")
    private String tagName;

    /**
     * tag文字颜色
     */
    @ApiModelProperty(value = "tag文字颜色")
    private String tagColor;

    /**
     * tag背景色
     */
    @ApiModelProperty(value = "tag背景色")
    private String tagBgColor;

    public interface insert{}


    public String getCollectId() {
        return collectId;
    }

    public void setCollectId(String collectId) {
        this.collectId = collectId;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    @NotBlank(message = "收藏夹名称不能为空")
    @Size(min = 0, max = 20, message = "收藏夹名称长度不能超过20个字符")
    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getIcon() {
        return icon;
    }

    public void setIcon(String icon) {
        this.icon = icon;
    }

    public String getIconColor() {
        return iconColor;
    }

    public void setIconColor(String iconColor) {
        this.iconColor = iconColor;
    }

    public Long getuId() {
        return uId;
    }

    public void setuId(Long uId) {
        this.uId = uId;
    }

    public Boolean getStatus() {
        return status;
    }

    public void setStatus(Boolean status) {
        this.status = status;
    }

    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    public Integer getTotalNum() {
        return totalNum;
    }

    public void setTotalNum(Integer totalNum) {
        this.totalNum = totalNum;
    }

    public String getOperate() {
        return operate;
    }

    public void setOperate(String operate) {
        this.operate = operate;
    }

    public String getInfo() {
        return info;
    }

    public void setInfo(String info) {
        this.info = info;
    }

    public Integer getCollectType() {
        return collectType;
    }

    public void setCollectType(Integer collectType) {
        this.collectType = collectType;
    }

    public String getTagName() {
        return tagName;
    }

    public void setTagName(String tagName) {
        this.tagName = tagName;
    }

    public String getTagColor() {
        return tagColor;
    }

    public void setTagColor(String tagColor) {
        this.tagColor = tagColor;
    }

    public String getTagBgColor() {
        return tagBgColor;
    }

    public void setTagBgColor(String tagBgColor) {
        this.tagBgColor = tagBgColor;
    }



    /**
     * toString
     *
     * @return String String
     */
    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", collectId=").append(collectId);
        sb.append(", title=").append(title);
        sb.append(", name=").append(name);
        sb.append(", icon=").append(icon);
        sb.append(", iconColor=").append(iconColor);
        sb.append(", uId=").append(uId);
        sb.append(", status=").append(status);
        sb.append(", url=").append(url);
        sb.append(", totalNum=").append(totalNum);
        sb.append(", operate=").append(operate);
        sb.append(", info=").append(info);
        sb.append(", collectType=").append(collectType);
        sb.append(", tagName=").append(tagName);
        sb.append(", tagColor=").append(tagColor);
        sb.append(", tagBgColor=").append(tagBgColor);
        sb.append(", createBy=").append(getCreateBy());
        sb.append(", createTime=").append(getCreateTime());
        sb.append(", updateBy=").append(getUpdateBy());
        sb.append(", updateTime=").append(getUpdateTime());
        sb.append("]");
        return sb.toString();
    }
}